type JSDynamicObject = any;
const reg : FinalizationRegistry <any> = new FinalizationRegistry <any> ((val : any) : any => {
        console.log (val);
    });
(() : any => {
        const obj : JSDynamicObject = {};
        reg.register (obj, 'obj has been garbage-collected.');
    }) ();
